package frame

import (
	"context"

	"go.uber.org/zap"
)

// Logger ...
func Logger(ctx context.Context) *zap.Logger {
	v := ctx.Value("log")
	if logger, ok := v.(*zap.Logger); !ok {
		panic("get logger in context failure")
	} else {
		return logger
	}
}
